﻿using Common.Enums;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace Entity.Models.Entities
{
    /// <summary>
    /// 耗材记录表
    /// </summary>
    public class ConsumableRecord : BaseEntity
    {

        /// <summary>
        /// 耗材Id
        /// </summary>
        [Column(TypeName = "varchar(36)")]
        public string ConsumableId { get; set; }

        /// <summary>
        /// 添加人Id
        /// </summary>
        [Column(TypeName = "varchar(36)")]
        public string Creator { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public int Num { get; set; }


        /// <summary>
        /// 操作类型
        /// </summary>
        public ConsumableRecordEnums Type { get; set; }


        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        //构造
        public ConsumableRecord(string consumableId, string creator, int num, int type)
        {
            Id = Guid.NewGuid().ToString();
            ConsumableId = consumableId;
            Creator = creator;
            Num = num;
            Type = (ConsumableRecordEnums)type;
            CreateTime = DateTime.Now;
        }
        public ConsumableRecord()
        {
        }

    }
}
